
import type { Metadata } from "next";
import "./globals.css";
import React from "react";
// import { Inter } from "next/font/google";
import IndexReduxProvider from "@/providers/redux-provider";
import { NodeMapProvider } from "@/providers/contextProvider";

import localFont from 'next/font/local'


// const inter = Inter({ subsets: ["latin"] });
const inter = localFont({
  src: [
    {
      path: '../public/fonts/Inter-VariableFont_opsz,wght.ttf',
      // 对于可变字体，不需要指定 weight 和 style
      // 一个文件包含所有变化
    },
  ],
  variable: '--font-inter',
  display: 'swap', // 推荐添加，优化加载行为
  // 可以指定回退字体
  fallback: ['system-ui', 'arial'],
  // 对于可变字体，可以定义字轴范围（可选）
  adjustFontFallback: false,
})


export default function RootLayout({
    children,
}: Readonly<{
    children: React.ReactNode;
}>) {
    return (
        <html lang="en">
            <body className={inter.className}>

                <IndexReduxProvider >
                    <NodeMapProvider>
                        {children}
                    </NodeMapProvider>
                </IndexReduxProvider>


            </body>
        </html>
    );
}
